package com.gcxy.mapper;

import com.gcxy.dto.student.StudentPageDTO;
import com.gcxy.dto.teacher.TeacherPageDTO;
import com.gcxy.entity.User;
import com.gcxy.vo.student.StudentPageVO;
import com.gcxy.vo.teacher.TeacherPageVO;
import com.gcxy.vo.user.UserPureVO;
import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author pep7chiao
 * @date 2024/7/6
 */
@Mapper
public interface UserMapper extends MPJBaseMapper<User> {
    Page<TeacherPageVO> selectTeacherStudentPageByCondition(@Param("page") Page<Object> page, @Param("query")TeacherPageDTO teacherPageDTO);

    /**
     * 根据学期ID和组织机构ID获取用户列表
     * @param semesterId 学期ID
     * @param agencyId 组织机构ID
     * @return
     */
    List<UserPureVO> getUserListBySemesterIdAndAgencyId(@Param("semesterId") Integer semesterId, @Param("agencyId") Integer agencyId);

    Page<StudentPageVO> getStudentTeacherPageByCondition(@Param("page") Page<Object> page, @Param("param") StudentPageDTO map);

    List<StudentPageVO> getStudentListPageByCondition(@Param("param") StudentPageDTO studentPageDTO);
}
